package com.crape.faq.dao;

import java.util.List;

import com.crape.common.exceptions.DAOException;
import com.crape.common.model.AccountInfo;
import com.crape.common.model.Answer;

public interface IAnswerDAO {

	List<Answer> getPagedAnswers(Long questionid, Integer startIndex, Integer pageSize) throws DAOException;
	
	Answer getTheAnswer(Long questionid) throws DAOException;

	void insertAnswer(Long accountid, Long questionid, String answer) throws DAOException;
	
	Long countAnswers(Long questionid) throws DAOException;

	void deleteAnswerById(Long id) throws DAOException;

	void updateAnswer(Answer answer) throws DAOException;

	void insertAnswerRef(Long accountid, Long answerid, Integer type) throws DAOException;

	void deleteAnswerRefById(Long id) throws DAOException;

	Long countAnswerRef(Long answerid, Integer type) throws DAOException;
	
	Long countAnswerRefByAccountid(Long accountid, Long answerid) throws DAOException;
	
}
